package com.ice.framework.utils

import okhttp3.MediaType
import okhttp3.MultipartBody
import okhttp3.RequestBody
import java.io.File

object RetrofitUtils {

    fun file2MultiPartBody(file: File):MultipartBody.Part {
        var requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file)
        return MultipartBody.Part.createFormData("file", file.name, requestBody)
    }
}